﻿using IM.Easy.Entity.System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IM.Easy.CoreServices.IServices
{
    public interface IDictGlobalService
    {
        /// <summary>
        /// 配置全局字典---配置到缓存中
        /// </summary>
        void SetGlobalData();

        /// <summary>
        /// 获取字典值
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        List<SysDictData> GetDictDatas(string code);

        /// <summary>
        /// 获取字典文本值
        /// </summary>
        /// <param name="value"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        string GetDictLabel(string value, string code);


        /// <summary>
        /// 更新字典
        /// </summary>
        void UpdateOrAppendDict(SysDictType dict);

        /// <summary>
        /// 移除字典
        /// </summary>
        /// <param name="code"></param>
        void RemoteDict(string code);

        /// <summary>
        /// 刷新清空字典缓存
        /// </summary>
        void Clear();
    }
}
